.class Lcom/example/m6wmr/ShopdetActivity$4;
.super Ljava/lang/Object;
.source "ShopdetActivity.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/example/m6wmr/ShopdetActivity;->bindbtn()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/example/m6wmr/ShopdetActivity;


# direct methods
.method constructor <init>(Lcom/example/m6wmr/ShopdetActivity;)V
    .locals 0

    .prologue
    .line 1
    iput-object p1, p0, Lcom/example/m6wmr/ShopdetActivity$4;->this$0:Lcom/example/m6wmr/ShopdetActivity;

    .line 257
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 11
    .param p1, "v"    # Landroid/view/View;

    .prologue
    const v10, 0x7f0c0141

    .line 260
    const-string v5, "ShopshowACtivity"

    const-string v6, "\u6536\u85cf\u5e97\u94fa"

    invoke-static {v5, v6}, Lmyapp/Mylog;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 261
    iget-object v5, p0, Lcom/example/m6wmr/ShopdetActivity$4;->this$0:Lcom/example/m6wmr/ShopdetActivity;

    invoke-virtual {v5}, Lcom/example/m6wmr/ShopdetActivity;->getDataCount()J

    move-result-wide v1

    .line 263
    .local v1, "checkobj":J
    const-wide/16 v5, 0x0

    cmp-long v5, v1, v5

    if-lez v5, :cond_0

    .line 265
    iget-object v5, p0, Lcom/example/m6wmr/ShopdetActivity$4;->this$0:Lcom/example/m6wmr/ShopdetActivity;

    # getter for: Lcom/example/m6wmr/ShopdetActivity;->db:Landroid/database/sqlite/SQLiteDatabase;
    invoke-static {v5}, Lcom/example/m6wmr/ShopdetActivity;->access$9(Lcom/example/m6wmr/ShopdetActivity;)Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v5

    const-string v6, "collect"

    new-instance v7, Ljava/lang/StringBuilder;

    const-string v8, "ShopId = \'"

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v8, p0, Lcom/example/m6wmr/ShopdetActivity$4;->this$0:Lcom/example/m6wmr/ShopdetActivity;

    # getter for: Lcom/example/m6wmr/ShopdetActivity;->shopid:Ljava/lang/String;
    invoke-static {v8}, Lcom/example/m6wmr/ShopdetActivity;->access$5(Lcom/example/m6wmr/ShopdetActivity;)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, "\'"

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    const/4 v8, 0x0

    invoke-virtual {v5, v6, v7, v8}, Landroid/database/sqlite/SQLiteDatabase;->delete(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)I

    .line 266
    iget-object v5, p0, Lcom/example/m6wmr/ShopdetActivity$4;->this$0:Lcom/example/m6wmr/ShopdetActivity;

    invoke-virtual {v5, v10}, Lcom/example/m6wmr/ShopdetActivity;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/ImageView;

    .line 267
    .local v3, "collectbtn":Landroid/widget/ImageView;
    iget-object v5, p0, Lcom/example/m6wmr/ShopdetActivity$4;->this$0:Lcom/example/m6wmr/ShopdetActivity;

    # getter for: Lcom/example/m6wmr/ShopdetActivity;->mcontext:Landroid/content/Context;
    invoke-static {v5}, Lcom/example/m6wmr/ShopdetActivity;->access$7(Lcom/example/m6wmr/ShopdetActivity;)Landroid/content/Context;

    move-result-object v5

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    .line 268
    .local v4, "resources":Landroid/content/res/Resources;
    const v5, 0x7f02003f

    invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    .line 269
    .local v0, "btnDrawable":Landroid/graphics/drawable/Drawable;
    invoke-virtual {v3, v0}, Landroid/widget/ImageView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 281
    :goto_0
    return-void

    .line 274
    .end local v0    # "btnDrawable":Landroid/graphics/drawable/Drawable;
    .end local v3    # "collectbtn":Landroid/widget/ImageView;
    .end local v4    # "resources":Landroid/content/res/Resources;
    :cond_0
    iget-object v5, p0, Lcom/example/m6wmr/ShopdetActivity$4;->this$0:Lcom/example/m6wmr/ShopdetActivity;

    # getter for: Lcom/example/m6wmr/ShopdetActivity;->db:Landroid/database/sqlite/SQLiteDatabase;
    invoke-static {v5}, Lcom/example/m6wmr/ShopdetActivity;->access$9(Lcom/example/m6wmr/ShopdetActivity;)Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v5

    const-string v6, "insert into collect (ShopId) values(?)"

    .line 275
    const/4 v7, 0x1

    new-array v7, v7, [Ljava/lang/Object;

    const/4 v8, 0x0

    iget-object v9, p0, Lcom/example/m6wmr/ShopdetActivity$4;->this$0:Lcom/example/m6wmr/ShopdetActivity;

    # getter for: Lcom/example/m6wmr/ShopdetActivity;->shopid:Ljava/lang/String;
    invoke-static {v9}, Lcom/example/m6wmr/ShopdetActivity;->access$5(Lcom/example/m6wmr/ShopdetActivity;)Ljava/lang/String;

    move-result-object v9

    aput-object v9, v7, v8

    .line 274
    invoke-virtual {v5, v6, v7}, Landroid/database/sqlite/SQLiteDatabase;->execSQL(Ljava/lang/String;[Ljava/lang/Object;)V

    .line 276
    iget-object v5, p0, Lcom/example/m6wmr/ShopdetActivity$4;->this$0:Lcom/example/m6wmr/ShopdetActivity;

    invoke-virtual {v5, v10}, Lcom/example/m6wmr/ShopdetActivity;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/ImageView;

    .line 277
    .restart local v3    # "collectbtn":Landroid/widget/ImageView;
    iget-object v5, p0, Lcom/example/m6wmr/ShopdetActivity$4;->this$0:Lcom/example/m6wmr/ShopdetActivity;

    # getter for: Lcom/example/m6wmr/ShopdetActivity;->mcontext:Landroid/content/Context;
    invoke-static {v5}, Lcom/example/m6wmr/ShopdetActivity;->access$7(Lcom/example/m6wmr/ShopdetActivity;)Landroid/content/Context;

    move-result-object v5

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    .line 278
    .restart local v4    # "resources":Landroid/content/res/Resources;
    const v5, 0x7f020040

    invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v0

    .line 279
    .restart local v0    # "btnDrawable":Landroid/graphics/drawable/Drawable;
    invoke-virtual {v3, v0}, Landroid/widget/ImageView;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    goto :goto_0
.end method
